<?php
/**
 * Created by PhpStorm
 * User: shen.zk
 * Date: 2023/10/26
 * Time: 09:53
 * Comment: ''
 */

namespace App\Params\Common;

use App\Params\BaseParam;

class CastingAccountParam extends BaseParam
{
    public $mid; // 接入商户号
    public $type; // 1充值 2撤销
    public $number; // 数量
    public $serial_number; // 申请流水号
    public $revoke_number; // 撤销铸造申请

    public function rules()
    {
        return [
            'mid' => 'required|string',
            'type' => 'required|int|in:1,2',
            'number' => 'nullable|int',
            'serial_number'=>'required|string',
            'revoke_number'=>'nullable|string',
        ];
    }

    public function message()
    {
        return [
            "mid.required" => "商户号不能为空",
            "type.required" => "交易类型不能为空",
            "type.in" => "交易类型参数错误",
            "serial_number.required" => "交易流水号不能为空",
        ];
    }
}
